import 'package:flutter/material.dart';
import 'package:dio/dio.dart';

class HomePage extends StatelessWidget {
  TextEditingController typeController = TextEditingController();

  String content = "";
  @override
  Widget build(BuildContext context) {
    getHttp();
    return Scaffold(
      body: Center(
          child: Column(
        children: [
          TextField(
            controller: typeController,
            decoration: InputDecoration(
              contentPadding: EdgeInsets.all(10.0),
              labelText: '',

            ),
          )
        ],
      )),
    );
  }

  Future getHttp() async {
    try {
      Response response;
      response =
          await Dio().get('http://120.25.226.11:8080/mall-app/wx/home/index');
      content = response.data.toString();
      return print(response);
    } catch (e) {
      return print(e);
    }
  }
}
